<!-- //父传子传参 -->
<!-- 模块说明 -->
<template>
    <div class="menu">
        <div v-for="(item, i) in data" :key="i">
            <img :src="item.img">
            <p>{{ item.title }}</p>
        </div>
    </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { IMenu } from "./index.vue"
const { data } = defineProps<{ data: IMenu[] }>()
console.log(data, "data")
</script>
<style lang="scss" scoped>
.menu {
    padding: 10px 0;
    display: flex;
    flex-wrap: wrap;
    font-size: 10px;

    p {
        line-height: 20px;
    }

    img {
        width: 40px;
        height: 40px;
    }

    >div {
        width: 25%;
        text-align: center;
        margin-top: 10px;
    }
}
</style>
